<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ShopUserBeforpass extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        //创建用户更改密码记录表
          Schema::create('shop_user_beforpasses', function (Blueprint $table) {
              $table->increments('id');
              $table->unsignedInteger('user_id');
              $table->string('befor_pass', 100)->comment('记录用户用过的密码');
              $table->timestamps();

              $table->foreign('user_id')
                ->references('id')->on('shop_home_users')
                ->onDelete('cascade');
          });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('shop_user_beforpasses');

    }
}
